<?php

namespace App\ApiCall\Wx\Qy;

use App\ApiCall\Wx\Applet\WxAppletExecute;
use App\ApiCall\Wx\Pay\WxPayClient;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Storage;

class WxQyExecute
{
    private $client;
    private $corpId;
    private $corpSecret;


    public function __construct()
    {
        $this->corpId = config('wx.qy_wx.corp_id');
        $this->corpSecret = 'mQEOXxROYsU3wELEIhBXpIttny54aQQRFUjzJVgvmGE';
        $token = 'Jb7Gcoc5MlO';
        $EncodingAESKey  = 'Bbo8vT3adWqov2DI8vvzLGJdvN72GnObLXCGjCHHtQt';
        $this->client = WxQyClient::getInstance('ww7f053a55a4cf36df','mQEOXxROYsU3wELEIhBXpIttny54aQQRFUjzJVgvmGE','https://qyapi.weixin.qq.com/cgi-bin/');
    }

    public function getAccessToken(){
        return $this->client->execute('gettoken',[
            'corpid' => $this->corpId,
            'corpsecret' =>$this->corpSecret,
        ]);
    }


}
